<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新增用户</title>
  <jsp:include page="../../include.jsp"/>
    <script>
        $(function (){
            $(".btn-success").click(function (){
                $.getJSON(
                    "user?action=save",
                    $("form").serialize(),
                    function (obj){
                        if(obj){
                            alert("新增成功！");
                            location="user?action=userList";
                        }else{
                            alert("新增失败！");
                        }
                    }
                )
            })

        })
    </script>
</head>
<body>
     <div class="container">
         <font color="red">${msg}</font>
          <br>
             <form>
              用户账号：<input name="username" type="text"><br>
              用户密码：<input type="password" name="password"><br>
              密码确认：<input type="password" name="password1"><br>
             </form>
         <button class="btn btn-success">提交</button>
         <button class="btn btn-primary">重置</button>
     </div>
</body>
</html>
